home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / www-talk.9301-9306.Z / www-talk.9301-9306 / text0497.txt < prev    next >
Encoding:
Text File  |  1995-04-24  |  3.5 KB  |  79 lines

  1. I wrote:
  2. >>As I see it, there are two possible ways of using MIME in HTTP+.  We
  3. >>can either support MIME as the *only* data format (implementing any
  4. >>extensions we need as new MIME content types or subtypes or additional
  5. >>headers), or we we support MIME as one of the possible data formats.
  6.  
  7. Dan's reply:
  8. >A terminology note here: there is no one "MIME data format." There's
  9. >the ubiquitous message/rfc822 format that you can stick anything
  10. >inside using MIME techniques. But the basic unit of information
  11. >in the MIME spec is an _entity_ -- just an arbitrary stream of bytes.
  12.  
  13. OK, when I said MIME data format I meant MIME message format, and was
  14. referring to the outer level only (and note that MIME *implies*
  15. RFC822).  I certainly did not refer to a particular content-type, not
  16. even to message/rfc822.  The only thing that isn't well-specified when
  17. one talks about "a file in MIME format" is whether line breaks are
  18. given as CRLF or as LF (or as something else).
  19.  
  20. >The question is, when you're sending an entity from one
  21. >place to another, how do you know where the end is?
  22.  
  23. This is a matter for the transport agent, not for MIME -- by the time
  24. you call in the MIME agent to handle the data you must *already* know
  25. where the end is.  For entities contained in other entities (e.g. the
  26. content-type family multipart/*) there is a way defined in MIME to
  27. find the end of the inner entities, but this is not true for the
  28. outermost entity.
  29.  
  30. >From the MIME point of view, an NNTP client and server have
  31. >an implicit agreement that the entity going across the
  32. >wire has a content-transfer-encoding of 7bit.
  33. >
  34. >This allows them to use the dot-on-a-line-by-iteself technique to
  35. >terminate the entitiy.
  36.  
  37. MIME and NNTP should never need to talk to each other.  MIME is a UA
  38. level format, NNTP is a message transfer agent protocol.  NNTP can use
  39. the dot-on-a-line-by-itself convention not because it is a 7-bit
  40. protocol (which it isn't -- although other message transfer protocols
  41. like SMTP are) but because it is a line-based protocol.  MIME is also
  42. mostly a line-based format, even if the content-transfer-encoding is
  43. 8bit -- it is only in binary mode that we get in trouble (since
  44. conversion from one kind of line terminator to another is dangerous
  45. for binary data).
  46.  
  47. >They also share assumptions about the content-type as
  48. >a separate issue. The client assumes the response to an
  49. >ARTICLE command is a message/rfc822 entity, while the
  50. >response to a BODY command is text/plain.
  51.  
  52. That's a nice way of putting it.
  53.  
  54. >[Long description of why you want to put the byte count in the MIME
  55. >headers omitted]
  56. >
  57. >It is somewhat intertwingled, but I still kinda like it.
  58.  
  59. And I still don't.  I have the feeling that it would be much easier to
  60. adapt HTTP to other (non-TCP) transport protocols if the size of an
  61. entity is given separately rather than computed from the entity itself
  62. (after all this nonsense is only necessary because TCP doesn't have a
  63. way to distinguish EOF from a broken connection).  As I understand it
  64. your main objection is that under my proposal you will have to
  65. construct the necessary headers in a buffer first.  I don't believe
  66. that this is that much of a hassle in today's computers -- it
  67. shouldn't be more than a couple of kilobytes even in extreme cases,
  68. which is peanuts even for a standard PC.
  69.  
  70. An issue on which I don't have a strong opinion is whether we should
  71. represent line separators as CRLF in the header -- anyone else?
  72.  
  73. Cheers,
  74.  
  75. --Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
  76. "The lawnmower.  Surely such a gadget could not have been generated
  77. independently in two separate areas."
  78.  
  79.